PopupMenuManager eats the next release event, which would otherwise close
the menu, so we need to tell dnd that we're handling it, and no drag should
be started, so it can ungrab the pointer and restore state.
https://bugzilla.gnome.org/show_bug.cgi?id=694276
popupMenu: function() {
this._removeMenuTimeout();
this.actor.fake_release();
+ this._draggable.fakeRelease();
if (!this._menu) {
this._menu = new AppIconMenu(this);
},
_ungrabActor: function() {
- Clutter.ungrab_pointer();
if (!this._onEventId)
return;
+
+ Clutter.ungrab_pointer();
this.actor.disconnect(this._onEventId);
this._onEventId = null;
},
return false;
},
+ /**
+ * fakeRelease:
+ *
+ * Fake a release event.
+ * Must be called if you want to intercept release events on draggable
+ * actors for other purposes (for example if you're using
+ * PopupMenu.ignoreRelease())
+ */
+ fakeRelease: function() {
+ this._buttonDown = false;
+ this._ungrabActor();
+ },
+
/**
* startDrag:
* @stageX: X coordinate of event